﻿//********************************************************************************//
//创建日期：<创建日期，2016-05-18>
//创建作者：<孙雪婷，sunxueting@shanghai3h.com>
//功能说明：水表信息查询
//********************************************************************************//
using BLL;
using BLL.Access;
using DevExpress.Web;
using Entity;
using System;
using System.Data;
using Web.Class;

namespace Web.Pages.YongShui._12.ChaXunGL
{
    public partial class ShuiBiaoXXCX : BasePage
    {

        #region 属性

        /// <summary>
        /// 保存结果集1
        /// </summary>
        private DataTable dtShuiBiaoXX
        {
            get
            {
                return ViewState["dtShuiBiaoXX"] as DataTable;
            }
            set
            {
                ViewState["dtShuiBiaoXX"] = value;
            }
        }

        /// <summary>
        /// 当前操作项ID
        /// </summary>
        private int ShuiBiaoXX_ID
        {
            get
            {
                return Convert.ToInt32(ViewState["ShuiBiaoXX_ID"]);
            }
            set
            {
                ViewState["ShuiBiaoXX_ID"] = value;
            }
        }
     
        /// <summary>
        /// 水量月
        /// </summary>
        private int I_M
        {
            get
            {
                return Convert.ToInt32(ViewState["I_M"]);
            }
            set
            {
                ViewState["I_M"] = value;
            }
        }
        /// <summary>
        /// 水量年
        /// </summary>
        private int I_Y
        {
            get
            {
                return Convert.ToInt32(ViewState["I_Y"]);
            }
            set
            {
                ViewState["I_Y"] = value;
            }
        }

        #endregion

        #region 变量

        /// </summary>
        /// 用户信息bll
        /// </summary>
        YS_YG_YONGHUXXBLL _YS_YG_YONGHUXXBLL = new YS_YG_YONGHUXXBLL();

        /// <summary>
        /// 管理部门bll
        /// </summary>
        YS_JX_ZHANDIANBLL _YS_JX_ZHANDIANBLL = new YS_JX_ZHANDIANBLL();

        /// <summary>
        /// 管理块BLL
        /// </summary>
        YS_JX_GUANLIKBLL _YS_JX_GUANLIKBLL = new YS_JX_GUANLIKBLL();

        /// <summary>
        /// 词语表设置BLL
        /// </summary>
        S_WORDSBLL _S_WORDSBLL = new S_WORDSBLL();

        /// <summary>
        /// 行政区BLL
        /// </summary>
        YS_JX_XINGZHENGQBLL _YS_JX_XINGZHENGQBLL = new YS_JX_XINGZHENGQBLL();
        /// <summary>
        /// 存储过程调用类
        /// </summary>
        SpHelper _SpHelper = new SpHelper();

        #endregion

        #region 事件

        /// <summary>
        /// 页面加载事件
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            //第一次页面加载
            if (!IsPostBack)
            {
                InitData();
            }
            gvShuiBiaoXX.DataSource = this.dtShuiBiaoXX;
            gvShuiBiaoXX.DataBind();
        }

        
        /// <summary>
        /// 查询信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnChaXun_Click(object sender, EventArgs e)
        {
            if (txtShuiLiangY.Text != "" && txtShuiLiangY.Text != null && txtShuiLiangM.Text != "" && txtShuiLiangM.Text != null)
            {
                this.I_Y = Convert.ToInt32(txtShuiLiangY.Text);
                this.I_M = Convert.ToInt32(txtShuiLiangM.Text);
                //站点
                string v_zhandian = cmbGuanLiBM.Value.ToString();
                string v_guanlikuai = "";
                string s_ywy = cmbYeWuY.Value.ToString() == "0" ? "" : cmbYeWuY.Value.ToString(); 
                int biaoshi = -1;
                string conStr = "";
                int kaohe = 0;
                //管理块
                if (cmbGuanLiK.Value != null && v_zhandian!="全部")
                {
                    v_guanlikuai = cmbGuanLiK.Value.ToString();
                }
                //包含预考核用户
                if (YuKaoHYH.Checked) 
                {
                    kaohe = 1;
                }

                if (rbnYongHuH.Checked && txtYongHuH.Text!="")//用户号
                {
                    biaoshi = 1;
                    conStr = txtYongHuH.Text;
                }
                else if (rbnShuiBiaoH.Checked && txtShuiBiaoH.Text!="")//水表号
                {
                    biaoshi = 2;
                    conStr = txtShuiBiaoH.Text;
                }
                else if (rbnYongHuM.Checked && txtYongHuM.Text!="")//用户名
                {
                    biaoshi = 3;
                    conStr = txtYongHuM.Text;
                }
                else if (rbnBiaoDZ.Checked && txtBiaoDZ.Text!="")//表地址
                {
                    biaoshi = 4;
                    conStr = txtBiaoDZ.Text;
                }
                else if (rbnBiaoLei.Checked && cbmBiaoLei.Text!="")//表类
                {
                    biaoshi = 5;
                    conStr = cbmBiaoLei.Value.ToString();
                }
                else if (rbnGuanWangKH.Checked && txtGuanWangKH.Text!="")//管网块号
                {
                    biaoshi = 6;
                    conStr = txtGuanWangKH.Text;
                }
                else if (rbnXingZhengQ.Checked && cmbXingZhengQ.Text!="")//行政区
                {
                    biaoshi = 7;
                    conStr = cmbXingZhengQ.Value.ToString();
                }
                else if (rbnChaoJianL.Checked && cbmChaoJianL.Text !=""&& txtChaoJianL.Text!="")//抄见量
                {
                    biaoshi = 8;
                    conStr = " AND A.I_BENYUESL"+cbmChaoJianL.Text+txtChaoJianL.Text;
                }
                else if (rbnYongShuiJ.Checked && cbmYongShuiJ.Text !=""&&txtYongShuiJ.Text!="")//用水价
                {
                    biaoshi = 9;
                    conStr = " AND A.N_YSJ"+cbmYongShuiJ.Text+txtYongShuiJ.Text;
                }
                else if (rbnChaoBiaoZT.Checked && cbmChaoBiaoZT.Text!="")//抄表状态
                {
                    biaoshi = 10;
                    conStr = cbmChaoBiaoZT.Value.ToString();
                }
                else if (rbnShuiSiZT.Checked && txtShuiSiZT.Text!="")//水司状态
                {
                    biaoshi = 11;
                    conStr = txtShuiSiZT.Text;
                }
                else if (rbnSheShuiDXFL.Checked)//涉水对象分类
                {
                    biaoshi = 12;
                    if (cmbSheShuiDXFL_q1.Text != "" && cmbSheShuiDXFL_h1.Text != "")
                    {
                        conStr = " AND  C.S_SHESHUIDXDM " + cmbSheShuiDXFL_q1.Text + cmbSheShuiDXFL_h1.Value.ToString();
                        if (cmbSheShuiDXFL_q2.Text != "" && cmbSheShuiDXFL_h2.Text != "")
                        {
                            conStr += " AND  C.S_SHESHUIDXDM " + cmbSheShuiDXFL_q2.Text + cmbSheShuiDXFL_h2.Value.ToString();
                        }
                    }

                }

                LoadGridData(v_zhandian, v_guanlikuai, s_ywy, biaoshi, conStr, kaohe);
                if (this.dtShuiBiaoXX == null || this.dtShuiBiaoXX.Rows.Count < 1)
                {
                    txtShuiBiaoH2.Text = "";
                    txtBiaoLei.Text = "";
                    txtYongHuH2.Text = "";
                    txtXingZhengQM.Text = "";
                    txtChaoBiaoRQ.Text = "";
                    txtShangYueRQ.Text = "";
                    txtYongHuM2.Text = "";
                    txtBenYueCM.Text = "";
                    txtShangYueCM.Text = "";
                    txtGuanWangKH2.Text = "";
                    txtBiaoCeH.Text = "";
                    txtChaoJianL2.Text = "";
                    txtJiaoZhengL.Text = "";
                    txtZhuangBiaoRQ.Text = "";
                    txtKouJing.Text = "";
                    txtSheShuiDXDM.Text = "";
                    txtYongShuiJ2.Text = "";
                    txtChaoBiaoZT.Text = "";
                    txtShuiSiZT2.Text = "";
                    txtSheShuiDXMC.Text = "";
                    txtGuJiCS.Text = "";
                    txtShuiBiaoHM.Text = "";
                    txtShuiBiaoDZ.Text = "";
                    zjl.Text = "共0条";
                }
            }
            else
            {
                
            }
        }

        /// <summary>
        /// 管理部门下拉改变事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void cmbGuanLiBM_SelectedIndexChanged(object sender, EventArgs e)
        {
            cmbGuanLiK.Items.Clear();
            cmbGuanLiK.Items.Add("全部", "");
            cmbGuanLiK.SelectedIndex = 0;
            string glbm_now = cmbGuanLiBM.Value != null ? cmbGuanLiBM.Value.ToString() : "全部";
            InitDataAgain(glbm_now);

        }

        /// <summary>
        /// 表格点击行事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvShuiBiaoXX_FocusedRowChanged(object sender, EventArgs e)
        {
            if (this.dtShuiBiaoXX != null && this.dtShuiBiaoXX.Rows.Count > 0)
            {
                this.ShuiBiaoXX_ID = Convert.ToInt32(this.gvShuiBiaoXX.GetRowValues(this.gvShuiBiaoXX.FocusedRowIndex, "ID"));
                SetDataTab1();
            }
        }

        /// <summary>
        /// 导出excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //protected void btnExportExcel_Click(object sender, EventArgs e)
        //{
        //    if (this.dtShuiBiaoXX != null && this.dtShuiBiaoXX.Rows.Count > 0)
        //    {
        //        PageTools.ExportExcel(this.dtShuiBiaoXX);
        //    }
        //    else
        //    {
        //        btnExport_Click(null, null);

        //    }
        //}
        protected void btnExport_Click(object sender, EventArgs e)
        {
            this.ASPxGridViewExporter1.GridViewID = "gvShuiBiaoXX";
            gvShuiBiaoXX.DataSource = dtShuiBiaoXX;
            gvShuiBiaoXX.DataBind();
            string sName = "水表信息";
            ASPxGridViewExporter1.WriteXlsToResponse(sName);
        }
      
        #endregion
       
        #region 方法

        /// <summary>
        /// 初始化数据
        /// </summary>
        private void InitData()
        {
            gvShuiBiaoXX.SettingsPager.Mode = GridViewPagerMode.EndlessPaging;
            //水量年月
            string water_y_m = BusinessTool.YS_GETSETTINGSVALUE(eSETTINGS_KEYNAME.WATER_Y_M.ToString());
            //管理部门
            DataTable dtGuanLiBM = _YS_JX_ZHANDIANBLL.SelectYS_JX_ZHANDIANsAll();
            for (int i = 0; i < dtGuanLiBM.Rows.Count; i++)
            {
                if (dtGuanLiBM.Rows[i]["S_ZHANDIANMC"].ToString() != "中心")
                {
                    cmbGuanLiBM.Items.Add(dtGuanLiBM.Rows[i]["S_ZHANDIANMC"].ToString(), dtGuanLiBM.Rows[i]["S_ZHANDIANBH"].ToString());
                }
            }
            if (cmbGuanLiBM.Items.Count > 1) cmbGuanLiBM.SelectedIndex = 1;

            //业务员
            LoadYWY();
            this.I_Y = Convert.ToInt32(water_y_m) / 100;
            this.I_M = Convert.ToInt32(water_y_m) % 100;
            txtShuiLiangY.Text = this.I_Y.ToString();
            txtShuiLiangM.Text = this.I_M.ToString();

            //加载水表类型，抄表状态
            LoadWords();

            //加载行政区
            LoadXingZhengQ();
            LoadYSXZ_SSDX();

            int userid = LoginInfo.CurrentUser.UserID;
            string username = LoginInfo.CurrentUser.UserName;
            //根据操作人加载管理部门(站点)
            DataTable dtZhanDian = BusinessTool.GetTextAndValue("View_AS_UserInfo", "ZHANDIANBH", "ROLEID", null, string.Format("USERID={0}", userid)).Tables[0];
            string zhandian = dtZhanDian.Rows[0]["TEXT"].ToString();//站点
            string roleid = dtZhanDian.Rows[0]["VALUE"].ToString();//9001 业务员，3001 办事处主任
            if (roleid == "9001")
            {
                if (zhandian == "00")
                {
                    cmbYeWuY.Enabled = false;
                    cmbYeWuY.Text = username;
                }
                else
                {
                    cmbGuanLiBM.Enabled = false;
                    cmbYeWuY.Enabled = false;
                    cmbGuanLiBM.Value = zhandian;
                    cmbYeWuY.Text = username;
                    //管理块
                    DataTable dtGuanLiK = _YS_JX_GUANLIKBLL.SelectYS_JX_GUANLIKsDynamic(string.Format("S_ZHANDIAN={0}", zhandian), null);
                    for (int i = 0; i < dtGuanLiK.Rows.Count; i++)
                    {
                        cmbGuanLiK.Items.Add(dtGuanLiK.Rows[i]["S_GUANLIKMC"].ToString(), dtGuanLiK.Rows[i]["S_GUANLIKH"].ToString());
                    }
                }
            }
            else if (roleid == "3001" || roleid == "4001")
            {
                cmbGuanLiBM.Enabled = false;
                cmbGuanLiBM.Value = zhandian;
                //管理块
                DataTable dtGuanLiK = _YS_JX_GUANLIKBLL.SelectYS_JX_GUANLIKsDynamic(string.Format("S_ZHANDIAN={0}", zhandian), null);
                for (int i = 0; i < dtGuanLiK.Rows.Count; i++)
                {
                    cmbGuanLiK.Items.Add(dtGuanLiK.Rows[i]["S_GUANLIKMC"].ToString(), dtGuanLiK.Rows[i]["S_GUANLIKH"].ToString());
                }
                LoadYWY();
            }
        }

        /// <summary>
        /// 加载行政区
        /// </summary>
        private void LoadXingZhengQ()
        {
            DataTable dtXingZhengQ = _YS_JX_XINGZHENGQBLL.SelectYS_JX_XINGZHENGQsDynamic("i_jlzt=0", " s_bianhao");
            for (int i = 0; i < dtXingZhengQ.Rows.Count; i++)
            {
                cmbXingZhengQ.Items.Add(dtXingZhengQ.Rows[i]["s_bianhao"] + "_" + dtXingZhengQ.Rows[i]["S_MINGCHENG"].ToString(), dtXingZhengQ.Rows[i]["s_bianhao"]);
            }
        }

        /// <summary>
        /// 加载用水性质、涉水对象
        /// </summary>
        private void LoadYSXZ_SSDX()
        {
            //涉水对象
            var dt_ssdx = _SpHelper.P_YSCX_YSXZ_SSDX(2).Tables[0];
            for (var i = 0; i < dt_ssdx.Rows.Count; i++)
            {
                cmbSheShuiDXFL_h1.Items.Add(dt_ssdx.Rows[i]["XH"] + "_" + dt_ssdx.Rows[i]["NA"], dt_ssdx.Rows[i]["XH"]);
            }
            //行业分类
            var dt_hhfl = _SpHelper.P_YSCX_YSXZ_SSDX(3).Tables[0];
            for (var i = 0; i < dt_hhfl.Rows.Count; i++)
            {
                cmbSheShuiDXFL_h2.Items.Add(dt_hhfl.Rows[i]["XH"] + "_" + dt_hhfl.Rows[i]["NA"], dt_hhfl.Rows[i]["XH"]);
            }

        }
        /// <summary>
        /// 加载水表类型，抄表状态
        /// </summary>
        private void LoadWords() 
        {
            DataTable dtShuiBiao = _S_WORDSBLL.SelectS_WORDsDynamic("belongid IN (6,9) ", "BELONGID,wordsid");
            for (int i = 0; i < dtShuiBiao.Rows.Count;i++ ) 
            {
                if (Convert.ToInt32(dtShuiBiao.Rows[i]["BELONGID"]) == 6)
                {
                    cbmBiaoLei.Items.Add(dtShuiBiao.Rows[i]["WORDSID"] + "_" + dtShuiBiao.Rows[i]["WORDSCONTENT"].ToString(), dtShuiBiao.Rows[i]["WORDSID"]);
                }
                else if (Convert.ToInt32(dtShuiBiao.Rows[i]["BELONGID"]) == 9) 
                {
                    cbmChaoBiaoZT.Items.Add(dtShuiBiao.Rows[i]["WORDSID"] + "_" + dtShuiBiao.Rows[i]["WORDSCONTENT"].ToString(), dtShuiBiao.Rows[i]["WORDSID"]);
                }
            }
        }

        /// <summary>
        /// 根据站点加载业务员
        /// </summary>
        private void LoadYWY()
        {
            DataTable dtYWY = BusinessTool.GetTextAndValue(
                "View_AS_UserInfo", "USERNAME", "USERID", null, this.cmbGuanLiBM.SelectedIndex == 0 ? "ROLENAME like '%业务员%' and department!=313" : string.Format("ZHANDIANBH='{0}' and ROLENAME like '%业务员%' and department!=313", this.cmbGuanLiBM.Value)
                 ).Tables[0];
            DataRow drTemp = dtYWY.NewRow();
            drTemp[0] = "";
            drTemp[1] = 0;
            dtYWY.Rows.InsertAt(drTemp, 0);
            PageTools.BindComboBox(
                this.cmbYeWuY, dtYWY
            );
            if (this.cmbYeWuY.Items.Count != 0)
            {
                this.cmbYeWuY.SelectedIndex = 0;
            }
        }

        /// <summary>
        /// 再次根据管理部门初始化查询条件
        /// </summary>
        /// <param name="glbm">管理部门</param>
        private void InitDataAgain(string glbm)
        {
            if (glbm != "全部")
            {
                //管理块
                DataTable dtGuanLiK = _YS_JX_GUANLIKBLL.SelectYS_JX_GUANLIKsDynamic(string.Format("S_ZHANDIAN={0}", glbm), null);
                for (int i = 0; i < dtGuanLiK.Rows.Count; i++)
                {
                    cmbGuanLiK.Items.Add(dtGuanLiK.Rows[i]["S_GUANLIKMC"].ToString(), dtGuanLiK.Rows[i]["S_GUANLIKH"].ToString());
                }
                //业务员
                LoadYWY();
            }
            else
            {
                cmbYeWuY.Items.Clear();
                //业务员
                LoadYWY();
            }

        }

        /// <summary>
        /// 加载查询数据
        /// </summary>
        private void LoadGridData(string v_zhandian, string v_guanlikuai, string v_ywy, int v_b, string conStr, int kaohe)
        {
            if (null != this.dtShuiBiaoXX)
            {
                gvShuiBiaoXX.DataSource = this.dtShuiBiaoXX = null;
                gvShuiBiaoXX.DataBind();
                ViewState.Remove("dtShuiBiaoXX");
                //System.Threading.Thread.Sleep(1000);
            }
            GC.Collect();
            this.dtShuiBiaoXX = _SpHelper.P_YSCX_SBXXCX(v_zhandian, v_guanlikuai, this.I_Y, this.I_M, v_ywy, kaohe, v_b, conStr, null).Tables[0];
            if (this.dtShuiBiaoXX != null && this.dtShuiBiaoXX.Rows.Count > 0)
            {
                zjl.Text = "共" + this.dtShuiBiaoXX.Rows.Count.ToString() + "条";
                if (this.dtShuiBiaoXX.Rows[0][0].ToString() != "-1")
                {
                    gvShuiBiaoXX.DataSource = this.dtShuiBiaoXX;
                    gvShuiBiaoXX.DataBind();
                    gvShuiBiaoXX.FocusedRowIndex = -1;
                    gvShuiBiaoXX.FocusedRowIndex = 0;
                    //SetDataTab1();
                }
                //else
                //{
                //    gvShuiBiaoXX.DataSource = null;
                //    gvShuiBiaoXX.DataBind();
                //}
            }
            //else
            //{
            //    gvShuiBiaoXX.DataSource = null;
            //    gvShuiBiaoXX.DataBind();
            //}

        }

        /// <summary>
        /// 给TAB1显示框赋值
        /// </summary>
        private void SetDataTab1()
        {
            DataTable dt_temp = _SpHelper.P_YSCX_SBXXCX("全部", "", this.I_Y, this.I_M,"", 0, -1, "", this.ShuiBiaoXX_ID).Tables[0];
            if (dt_temp != null && dt_temp.Rows.Count > 0)
            {
                txtShuiBiaoH2.Text = dt_temp.Rows[0]["S_SHUIBIAOBH"].ToString();
                txtBiaoLei.Text = dt_temp.Rows[0]["I_TYPE"].ToString();
                txtYongHuH2.Text = dt_temp.Rows[0]["S_YONGHUBH"].ToString();
                txtXingZhengQM.Text = dt_temp.Rows[0]["S_XINGZHENGQBH"].ToString();
                txtChaoBiaoRQ.Text = dt_temp.Rows[0]["D_CHAOBIAO"].ToString();
                txtShangYueRQ.Text = dt_temp.Rows[0]["D_SHANGYUE"].ToString();
                txtYongHuM2.Text = dt_temp.Rows[0]["S_YONGHUM"].ToString();
                txtBenYueCM.Text = dt_temp.Rows[0]["I_BENYUECM"].ToString();
                txtShangYueCM.Text = dt_temp.Rows[0]["I_SHANGYUECM"].ToString();
                txtGuanWangKH2.Text = dt_temp.Rows[0]["S_KUAIHAO"].ToString();
                txtBiaoCeH.Text = dt_temp.Rows[0]["S_CH"].ToString();
                txtChaoJianL2.Text = dt_temp.Rows[0]["I_BENYUESL"].ToString();
                txtJiaoZhengL.Text = dt_temp.Rows[0]["I_JIAODUISL"].ToString();
                txtZhuangBiaoRQ.Text = dt_temp.Rows[0]["D_ZHUANGBIAO"].ToString();
                txtKouJing.Text = dt_temp.Rows[0]["I_KOUJING"].ToString();
                txtSheShuiDXDM.Text = dt_temp.Rows[0]["S_SHESHUIDXDM"].ToString();
                txtYongShuiJ2.Text = dt_temp.Rows[0]["N_YSJ"].ToString();
                txtChaoBiaoZT.Text = dt_temp.Rows[0]["S_CHAOBIAOZT"].ToString();
                txtShuiSiZT2.Text = dt_temp.Rows[0]["SHUISI"].ToString();//20190411
                txtSheShuiDXMC.Text = dt_temp.Rows[0]["sheshuimc"].ToString();
                txtGuJiCS.Text = dt_temp.Rows[0]["I_GUJICS"].ToString();
                txtShuiBiaoHM.Text = dt_temp.Rows[0]["S_SHUIBIAOBH"].ToString();
                txtShuiBiaoDZ.Text = dt_temp.Rows[0]["S_DIZHI"].ToString();
            }
        }

        /// <summary>
        /// 前台表格行改变事件回调方法
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        protected void ASPxCallback1_Callback(object source, DevExpress.Web.CallbackEventArgs e)
        {
            int id = Convert.ToInt32(this.hdCollection.Get("ID"));

            if (e.Parameter == "setinfo")
            {
                string msg = "";
                DataTable dt_temp = _SpHelper.P_YSCX_SBXXCX("全部", "", this.I_Y, this.I_M, "", 0, -1, "", id).Tables[0];
                if (dt_temp != null && dt_temp.Rows.Count > 0)
                {

                    msg = string.Join("|", Convert.ToString(dt_temp.Rows[0]["S_SHUIBIAOBH"]), Convert.ToString(dt_temp.Rows[0]["I_TYPE"]), Convert.ToString(dt_temp.Rows[0]["S_YONGHUBH"]),
                        Convert.ToString(dt_temp.Rows[0]["XINGZHENGQ"]), Convert.ToString(dt_temp.Rows[0]["D_CHAOBIAO"]), Convert.ToString(dt_temp.Rows[0]["D_SHANGYUE"]),
                        Convert.ToString(dt_temp.Rows[0]["S_YONGHUM"]), Convert.ToString(dt_temp.Rows[0]["I_BENYUECM"]), Convert.ToString(dt_temp.Rows[0]["I_SHANGYUECM"]), Convert.ToString(dt_temp.Rows[0]["S_KUAIHAO"])
                        , Convert.ToString(dt_temp.Rows[0]["S_CH"]), Convert.ToString(dt_temp.Rows[0]["I_BENYUESL"]), Convert.ToString(dt_temp.Rows[0]["I_JIAODUISL"]), Convert.ToString(dt_temp.Rows[0]["D_ZHUANGBIAO"])
                        , Convert.ToString(dt_temp.Rows[0]["I_KOUJING"]), Convert.ToString(dt_temp.Rows[0]["S_SHESHUIDXDM"]), Convert.ToString(dt_temp.Rows[0]["N_YSJ"]), Convert.ToString(dt_temp.Rows[0]["S_CHAOBIAOZT"])
                        , Convert.ToString(dt_temp.Rows[0]["sheshuimc"]), Convert.ToString(dt_temp.Rows[0]["I_GUJICS"]), Convert.ToString(dt_temp.Rows[0]["S_SHUIBIAOBH"]), Convert.ToString(dt_temp.Rows[0]["S_DIZHI"]),
                        dt_temp.Rows[0]["S_MINGCHENG"].ToString(), dt_temp.Rows[0]["SHUISI"].ToString());
                }

                e.Result = e.Parameter + "|0|" + msg;
            }
        }
        #endregion


    }


}